package com.llk.p;

import org.docx4j.openpackaging.packages.OpcPackage;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.openpackaging.parts.Parts;

import java.io.File;
import java.io.FileInputStream;

/**
 * 文件的各个部分
 */
public class Test01 {

    public static void main(String[] args) throws Exception {
        String filePath = "p/1.docx";
        String destPath = "p/dest/1.docx";
        WordprocessingMLPackage wPackage = WordprocessingMLPackage.load(new FileInputStream(filePath));

        Parts parts = wPackage.getParts();
        System.out.println(parts);

        wPackage.save(new File(destPath));
    }
}
